from sqlalchemy import Column, String, Text, text,Integer,SmallInteger
from app.db.base_class import Base
__all__ = [
    'NoticeSetting', 'notice_setting',
]


class NoticeSetting(Base):
    """通知设置实体"""
    __tablename__ = 'la_notice_setting'
    __table_args__ = {'comment': '消息通知设置表',}

    scene = Column(Integer, nullable=False, server_default=text('0'), comment='场景编号')
    name = Column(String(100), nullable=False, default='', comment='场景名称')
    remarks = Column(String(200), nullable=False, default='', comment='场景描述')
    recipient = Column(SmallInteger, nullable=False, server_default=text('0'),
                       comment='接收人员: [1=用户, 2=平台]')
    type = Column(SmallInteger, nullable=False, server_default=text('0'),
                  comment='通知类型: [1=业务, 2=验证]')
    system_notice = Column(Text, nullable=True, comment='系统的通知设置')
    sms_notice = Column(Text, nullable=True, comment='短信的通知设置')
    oa_notice = Column(Text, nullable=True, comment='公众号通知设置')
    mnp_notice = Column(Text, nullable=True, comment='小程序通知设置')

notice_setting = NoticeSetting.__table__
